//
//  TongXunLuTableViewCell.m
//  Cunli
//
//  Created by 湛亚 on 15/8/28.
//  Copyright (c) 2015年 lilubin. All rights reserved.
//

#import "TongXunLuTableViewCell.h"
#import "UIImageView+WebCache.h"

#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

@implementation TongXunLuTableViewCell{
    
    UIImageView *headImg;
    UILabel *workLabel;
    UILabel *nameLabel;
}

- (id)initWithStyle:(UITableViewCellStyle)style
    reuseIdentifier:(NSString *)reuseIdentifier andPerson:(PersonInfo *)person
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        headImg=[[UIImageView alloc]initWithFrame:CGRectMake(10, 5, 40, 40)];
        headImg.layer.cornerRadius = 20;
        headImg.clipsToBounds = YES;
        [headImg setImageWithURL:[NSURL URLWithString:person.pic] placeholderImage:[UIImage imageNamed:@"default_touxiao.png"]];
        [self.contentView addSubview:headImg];
        
        nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(60, 15, 80, 20)];
        //nameLabel.textColor = [UIColor colorWithRed:18/255.0 green:133/255.0 blue:210/255.0 alpha:1];
        nameLabel.text=person.truename;
        //nameLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:nameLabel];
        
        workLabel = [[UILabel alloc] initWithFrame:CGRectMake(150, 15, 100, 20)];
        workLabel.text=person.workareaname;
        [self.contentView addSubview:workLabel];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
